<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>Insert title here</title>
		<link rel="stylesheet" href="../../lib/layui/css/layui.css" media="all">
	</head>

	<body>
		<form class="layui-form" id="forms">
				<div class="layui-form-item">
				<label class="layui-form-label"><span style="color: red;">*</span>
				仓库编号</label>
				<div class="layui-input-inline">
					<input type="text" name="name" id="name" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
				</div>
				</div>
				<div class="layui-form-item">
				<label class="layui-form-label"><span style="color: red;">*</span>
				仓库名称</label>
				<div class="layui-input-inline">
					<input type="text" name="name" id="name" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
				</div>
				</div>
				<div class="layui-form-item">
				<label class="layui-form-label"><span style="color: red;">*</span>
				仓库类型</label>
				<div class="layui-input-inline">
					<input type="text" name="name" id="name" required lay-verify="required" placeholder="请输入" autocomplete="name" class="layui-input">
				</div>
				</div>
				<div class="layui-form-item">
				<label class="layui-form-label">备注</label>
				<div class="layui-input-inline">
					<input type="text" name="name" id="name" placeholder="请输入" autocomplete="name" class="layui-input">
				</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo" id="sub">修改</button>
				</div>
			</div>
		</form>
	</body>
	<script type="text/javascript" src="js/User.js"></script>
	<script src="../../layui/layui.js"></script>
	<script>
		layui.use('form', function() {
			var form = layui.form;
			var $ = layui.jquery; 
			
			$("#sub").click(function(){
				var data=$("#forms").serialize();
				var url =globalData.server+ 'depot/depotUpdate';
				$.post(url, data, function(data) {
					if (data.count > 0) {
						console.log('修改成功');
						var index = parent.layer.getFrameIndex(window.city); 
						parent.layer.close(index);
					}
				}, "json");
				return false;
			});
		});
	</script>

</html>